package com.shigen.shop.enums;

/**
 * 异常状态枚举
 *
 * @author shigenfu
 * @date 2022/7/24 8:27 下午
 */
public enum BizCodeEnum {
  /**
   * 通用操作码
   */
  OPS_REPEAT(110001, "重复操作"),
  PARAM_REQUIRED(110002, "缺少参数"),

  /**
   * 验证码
   */
  CODE_TO_ERROR(240001, "接收号码不合规"),

  CODE_LIMITED(240002, "验证码发送过快"),

  CODE_ERROR(240003, "验证码错误"),

  CODE_CAPTCHA(240101, "图形验证码错误"),

  /**
   * 账号
   */
  ACCOUNT_REPEAT(250001, "账号已经存在"),

  ACCOUNT_UNREGISTER(250002, "账号不存在"),

  ACCOUNT_PWD_ERROR(250003, "账号或者密码错误"),

  ACCOUNT_FORMAT_ERROR(250004, "账号或者密码格式错误");


  private Integer code;
  private String msg;

  BizCodeEnum(Integer code, String msg) {
    this.code = code;
    this.msg = msg;
  }

  public Integer getCode() {
    return code;
  }

  public void setCode(Integer code) {
    this.code = code;
  }

  public String getMsg() {
    return msg;
  }

  public void setMsg(String msg) {
    this.msg = msg;
  }
}
